import time

def showtime(f):
    def metric(*args,**kw):
        start_time = time.time()
        f(*args,**kw)
        end_time = time.time()
        print('耗时：{:.4f}s'.format(end_time - start_time))
    return metric

